﻿namespace EveKillboard.Core
{
    using System;
    using System.ComponentModel.DataAnnotations;

    [Table("ApiKeys")]
    public class EveApiKeys
    {
        public enum KeyTypesEnum : byte
        {
            NotDefined  = 0x00,
            Character   = 0x01,
            Corporation = 0x02,
            Alliance    = 0x03
        }

        [Key]
        [Column("ID")]
        public int Id { get; set; }
        [Column("KeyID")]
        public int KeyId { get; set; }
        [Column("VCode")]
        public string VerificationCode { get; set; }
        [Column("KeyType")]
        public byte KeyType { get; set; }
        [NotMapped]
        public KeyTypesEnum Type
        {
            get { return (KeyTypesEnum) KeyType; }
        }
    }
}